package com.whfc.hdc.dao;

import com.whfc.hdc.entity.FshDeviceConfig;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author qzexing
 * @version 1.0
 * @date 2021-07-14 16:02
 */
@Repository
public interface FshDeviceConfigMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(FshDeviceConfig record);

    int insertSelective(FshDeviceConfig record);

    FshDeviceConfig selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(FshDeviceConfig record);

    int updateByPrimaryKey(FshDeviceConfig record);

    /**
     * 根据设备编码查找
     *
     * @param sn 设备sn
     * @return 设备配置
     */
    FshDeviceConfig selectBySn(@Param("sn") String sn);

    /**
     * 获取极光注册ID
     *
     * @param snList 设备sn列表
     * @return 极光注册ID
     */
    List<String> selectRegistrationIdList(@Param("snList") List<String> snList);


    /**
     * 获取极光注册ID
     *
     * @param sn 设备sn
     * @return 极光注册ID
     */
    String selectRegistrationId(@Param("sn") String sn);
}